package com.ben.multiple.util;

import com.github.houbb.heaven.util.lang.StringUtil;
import com.github.houbb.pinyin.constant.enums.PinyinStyleEnum;
import com.github.houbb.pinyin.util.PinyinHelper;

/**
 * https://github.com/houbb/pinyin
 *
 * @author BenJin Yin
 * @date 2020/10/28
 */
public class PinYinUtils {
    public static void main(String[] args) {
        String name = "曾国藩";
        System.out.println(PinyinHelper.toPinyin(name));
        System.out.println(PinyinHelper.toPinyin(name, PinyinStyleEnum.NORMAL));
        System.out.println(PinyinHelper.toPinyin(name, PinyinStyleEnum.FIRST_LETTER));
        System.out.println(PinyinHelper.toPinyin(name, PinyinStyleEnum.NORMAL, StringUtil.EMPTY));
        System.out.println(PinyinHelper.toPinyinList('曾'));
        System.out.println(PinyinHelper.hasSamePinyin('本','苯'));
        System.out.println(PinyinHelper.toneNumList("刘禅"));
        System.out.println(PinyinHelper.toneNumList('禅'));
        System.out.println(PinyinHelper.toneNumList('赵'));

    }
}
